_c_o_c_o_g_i_f uses the International Color Consortium (ICC) profiles to
determine how to perform the appropriate color management operation
("color correction", hence "coco") upon a GIF image file. The operation
will be a color space conversion from the input device color space to the
output device color space.
The device color space associated with the input stream is determined in
one of four ways. The following approaches are tried in order:
+o First, if the _----_ssss flag is set, the specified _s_o_u_r_c_e-_p_r_o_f_i_l_e will be
used. Specifying _----_ssss will override any profile embedded in the
source image.
+o Second, if there is an ICC profile embedded in the source image,
that will be used.
+o Third, if the _----_aaaa flag is set, the specified _s_o_u_r_c_e__p_r_o_f_i_l_e will be
used. Embedded profiles take precedence over profiles specified
with _----_aaaa.
+o Finally, the color management system's default RGB profile will be
used. If no default is set, the system searches through
_CCCC_MMMM_SSSS______PPPP_RRRR_OOOO_FFFF_IIII_LLLL_EEEE______PPPP_AAAA_TTTT_HHHH for the default monitor profile, _mmmm_oooo_nnnn_iiii_tttt_oooo_rrrr_...._pppp_ffff. If
that profile is not found, _cccc_oooo_cccc_oooo_gggg_iiii_ffff has no way to determine a source
device profile and so passes the input image stream through
unchanged.
The output device color space is determined quite simply from the value
of the _----_dddd flag.
If a full path is not provided for a device profile, the system looks
through the directories specified in _CCCC_MMMM_SSSS______PPPP_RRRR_OOOO_FFFF_IIII_LLLL_EEEE______PPPP_AAAA_TTTT_HHHH.
If, for any reason _cccc_oooo_cccc_oooo_gggg_iiii_ffff is unable to perform the requested conversion,
the source stream is copied to the destination stream. Some of the
reasons that a conversion might not be performed are:
+o no destination profile was specified;
+o the number of channels in the input or output stream does not match